<%--
  Created by IntelliJ IDEA.
  User: 蒋缇
  Date: 2020/9/20
  Time: 21:16
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<html>
<head>
    <title>退出</title>
    <link rel="stylesheet"  href="css/bootstrap.min.css"/>
    <script src="js/jquery-3.1.1.min.js"></script>
    <script src="js/bootstrap.min.js"></script>
</head>
<body>
<script type="text/javascript">
    $.ajax(
        {
            data: {'exit': "exit"},
            dataType: 'text',
            type: 'post',
            url: '<%=basePath%>ExitBlogServlet',
            success: function () {
                window.location = "<%=basePath%>websiteHomepage.jsp";
            },
            error: function () {
                alert("退出失败");
            }
        }
    );
</script>
</body>
</html>
